package cn.yr.mapper;

import cn.yr.domain.entity.Tag;
import cn.yr.domain.pojo.ArticleTagPojo;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author     ：lang
 * @date       ：2020/3/11
 * @description： 文章标签
 * @version:     1.0
 */
@Mapper
public interface TagMapper extends BaseMapper<Tag> {

    List<ArticleTagPojo> selectArticleTagList(@Param(Constants.WRAPPER) QueryWrapper wrapper);

    /**
     * @Description:获取最多id
     */
    @Select("select max(id) from tag")
    Integer getMaxId();
}
